package com.example.demo.tool.fileEnums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Auter 李孝在
 * @Date 2025/1/18
 */
@AllArgsConstructor
@Getter
public enum FileSizeLimitEnum {
    NO_LIMIT(null),
    M10(MBToByte(10L));

    private final Long maxSize;
    //kb转byte
    private static Long KBToByte(Long KM){
        return KM*1024;
    }
    private static Long MBToByte(Long MB){
        return KBToByte(MB*1024);
    }
    private static Long GBToByte(Long GB){
        return MBToByte(GB*1024);
    }
    private static Long TBToByte(Long TB){
        return GBToByte(TB*1024);
    }
}
